/*
 * FixedSizeBlock.h
 *
 *  Created on: Oct 14, 2012
 *      Author: m
 */

#ifndef FIXEDSIZEBLOCK_H_
#define FIXEDSIZEBLOCK_H_

#include <iostream>
#include "physical_layer_commons.h"

namespace physical
{

class FixedSizeBlock
{
private:
	size_t m_blockSize;
	size_t m_contentLength;
	std::unique_ptr<byte[]>  m_content;

public:
	FixedSizeBlock( size_t size );
	FixedSizeBlock( size_t blockSize, UP_byteStream content=NULL, size_t contentLength=NULL );
	byteStream getContent();
	bool setContent( const byteStream newContent, size_t contentLength );
	bool appendContent( const byteStream newContent, size_t contentLength );
	size_t getBlockSize();
	size_t getContentLength();

	virtual ~FixedSizeBlock();
};

}
#endif /* FIXEDSIZEBLOCK_H_ */
